package com.atguigu.dao;

import com.atguigu.pojo.TravelGroup;
import com.atguigu.pojo.TravelItem;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhengkaiyuan
 * @version 1.0
 * @create 2021-06-21 10:42
 */
public interface TravelGroupDao {

    Page<TravelGroup> findPage(@Param("queryString") String queryString);

    void add(TravelGroup travelGroup);

    void setTravelGroupAndTravelItem(@Param("travelGroupId") Integer travelGroupId, @Param("travelItemIds") Integer[] travelItemIds);

    void delete(Integer id);

    void deleteTravelGroupAndTravelItem(Integer id);

    TravelGroup findById(Integer id);


    List<Integer> findTravelItemIdByTravelgroupId(Integer id);

    void edit(TravelGroup travelGroup);


    void editGroupItem(@Param("id") Integer id,@Param("travelItemId") Integer[] travelItemId);

    List<TravelGroup> findAll();


    Integer findCountByTravelGroupId(Integer id);

    List<TravelGroup> findByCondition(@Param("queryString")String queryString);



    List<TravelGroup> findTravelGroupListById(Integer id);

    List<TravelGroup> findByConditionAndTravelItem(@Param("queryString")String queryString);
}
